{% extends "base.html" %}
{% block title %}
Incollo.com - a free collaborative debugging tool - View Paste
{% endblock %}

{% block center %}
        <h1>
            {% ifequal entry.title '' %}
                <a name="colorized" href="{{entry.get_absolute_url}}">Untitled Paste</a>
            {% else %}
                <a name="colorized" href="{{entry.get_absolute_url}}">{{entry.title}}</a>
            {% endifequal %}
        </h1>
	
        <h3>
            <label for="id_permalink">固定链接: </label>
            <input type="text" value="http://localhost/{{entry.hash_key}}" id="id_permalink" onfocus="selectAll('id_permalink');" />
            <label for="id_language">代码语言: </label>
            <input type="text" value="{{entry.language}}"/>
        </h3>
	<div class="sub-header">
	    {% if entry.in_response_to %}
	    <script type="text/javascript">
	    $(document).ready(function(){
		$("div.in-response-to").hide();
		$("div.in-response-to").fadeIn("slow");
	    });
	    </script>
	    <div class="in-response-to">
	    <h3>
		<label for="id_permalink">In response to: </label>
		<a id="original-paste" href="{{entry.in_response_to.get_absolute_url}}">{{entry.in_response_to}}</a>, posted on {{entry.in_response_to.entry_date|date}}&nbsp;
		<a id="view-diff" href="/compare/{{entry.in_response_to.hash_key}}/{{entry.hash_key}}?keepThis=true&TB_iframe=true&height=500&width=800" class="thickbox new">View diff</a>
		<a id="view-diff" href="/compare/{{entry.in_response_to.hash_key}}/{{entry.hash_key}}" class="new-window">View diff (full-screen)</a>
	    </h3>
	    
	    {% else %}
	    <div class="not-in-response-to">
	    <h3>
		&nbsp;
	    </h3>
	    {% endif %}
	    </div>
	</div>
        <a href="/download/{{entry.hash_key}}">下载文本文件</a>
	    <a href="/discuss/{{entry.hash_key}}" class="new">优化代码</a>
        <a href="/report/{{entry.hash_key}}?KeepThis=true&TB_iframe=true&height=500&width=600" style="margin-right:20px;" class="thickbox">报告滥用</a>
        <a href="#plain">文本格式</a>
	
        <div class="entry">
	    {% autoescape off %}{{colorized_body}}{% endautoescape %}
        </div>
	<div style="height:35px;">
	&nbsp;
	</div>
        <h1><a name="plain">简明文本</a></h1>
	<div style="height:35px;">
	{% if entry.in_response_to %}
	<h3>
	    <label for="id_permalink">In response to: </label>
            <a href="{{entry.in_response_to.get_absolute_url}}">{{entry.in_response_to.title}}</a>
	</h3>
	{% else %}
	&nbsp;
	{% endif %}
	</div>
        <a href="/download/{{entry.hash_key}}">下载文本文件</a>
        <a href="" class="select_all_text" >全选</a>
	<a href="/discuss/{{entry.hash_key}}" class="new">优化代码</a>
        <a href="/report/{{entry.hash_key}}?KeepThis=true&TB_iframe=true&height=500&width=600" style="margin-right:20px;" class="thickbox">报告滥用</a>
        <a href="#colorized">彩色格式</a>
	<div>
		<textarea readonly="readonly" name="code_plain" id="id_code_plain" class="code_plain">{{entry.body}}</textarea>
	</div>
{% endblock %}
